/**
 * @ClassName icon
 * @Description 图标工具类
 * @Author xuyizhuo
 * @Date 2024/12/8 22:02
 */
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { glyphs } from '@/assets/iconfont/iconfont.json'

/** Element plus 图标列表 */
export const elIconNames = Object.keys(ElementPlusIconsVue)

// 获取所有的iconfont图标
const iconNameList = []
for (let i = 0, length = glyphs.length; i < length; i++) {
    iconNameList.push(glyphs[i].font_class)
}

/** iconfont 图标列表 */
export const iconfonts = iconNameList // iconfont图标

/** iconfont、element plus 的图标列表 */
export const AllIconNames = [...elIconNames, ...iconNameList] // el、iconfont图标
